package cn.lili.event.impl;

import cn.lili.common.security.AuthUser;
import cn.lili.event.UserLoginEvent;
import cn.lili.modules.member.client.UserClient;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * 会员自身业务
 *
 * @author Chopper
 * @version v1.0
 * 2022-01-11 11:08
 */
@Service
@RequiredArgsConstructor
public class UserExecute implements UserLoginEvent {
    private final UserClient userClient;

    @Override
    public void userLogin(AuthUser authUser) {
        userClient.updateUserLoginTime(authUser.getId());
    }
}
